package io.wins.vertx.service;

import io.vertx.core.Vertx;
import io.vertx.core.eventbus.Message;
import io.wins.vertx.entity.Goods;
import io.wins.vertx.service.impl.GoodsServiceImpl;

public interface GoodsService {
    String SERVICE_ADDRESS = "goods.service";

    static GoodsService create(final Vertx vertx) {
        return new GoodsServiceImpl(vertx);
    }

    GoodsService listAllGoods(final Message tMessage);

    GoodsService listGoodsByPage(final int page, final int limit, final Message tMessage);

    GoodsService getGoodsById(final String id, final Message tMessage);

    GoodsService insertGoods(final Goods goods, final Message tMessage);

    GoodsService deleteGoods(final String id, final Message tMessage);

    GoodsService updateGoods(final Goods goods, final Message tMessage);

    GoodsService publish(final String id, final String onSell, final Message tMessage);
}
